package cn.wizzer.app.user.modules.models;


import cn.wizzer.app.user.modules.models.enums.GroupApplyEnum;
import cn.wizzer.framework.base.model.BaseModel;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import org.nutz.integration.json4excel.annotation.J4EIgnore;


/**
 * 申请入群记录
 */
@Data
@Table("group_apply")
public class GroupApply extends BaseModel {
    @Column
    @Name
    @Comment("ID")
    @J4EIgnore
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(uu32 = true)
    private String id;


    @Comment("群id")
    @Column
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String groupId;


    @Comment("用户id")
    @Column
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String userId;


    @Column
    @Comment("申请内容")
    @ColDefine(type = ColType.VARCHAR, width = 256)
    private String content;


    @Column
    @Comment("状态->申请中:APPLYING,已同意:AGREED,已拒绝:REFUSED")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private GroupApplyEnum status;


    @Column
    @Comment("创建时间")
    @PrevInsert(els = @EL("$me.now()"))
    private Long ctAt;
}
